cmake_minimum_required(VERSION 3.5)

project(c-linked-lists LANGUAGES C)

set(CMAKE_C_STANDART 11)
set(CMAKE_C_STANDART_REQUIRED ON)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic")
set(LIB_NAME "linked-lists")

file(GLOB_RECURSE HDR include/*.h)
file(GLOB_RECURSE SRC src/*.c)

add_library(${LIB_NAME} SHARED ${HDR} ${SRC})
add_executable(${PROJECT_NAME} main.c ${HDR} ${SRC})
target_link_libraries(${PROJECT_NAME} ${LIB_NAME})
